/* ==================================== */
/* CSS for control sap.ui.unified/Menu  */
/* Base theme                           */
/* ==================================== */

@sapUiMnuItmHeight: 2rem;
@sapUiMnuItmPadding: 0.5rem;
@sapUiMnuItmHeightCozy: 3rem;
@sapUiMnuItmPaddingCozy: 1rem;

.sapUiMnu {
	/* initially hidden off the screen */
	position: absolute;
	top: -10000px;
	display: block;
	min-width: 80px;
	background-color: @sapUiListBackground;
	cursor: default;
	outline: none;
	overflow: hidden;
	padding: 1px;
	font-family: @sapUiFontFamily;
	font-size: @sapMFontMediumSize;
	padding: 0px;
	min-width: 5rem;
	color: @sapUiListTextColor;
	box-shadow: @sapUiShadowLevel1;
	border-radius: 0.25rem;
}

.sapUiMnu:focus {
	outline: none;
}

.sapUiMnuLst {
	padding: 0;
	margin: 0;
	display: block;
	cursor: default;
	color: @sapUiListTextColor;
	font-size: @sapMFontMediumSize;
	font-family: @sapUiFontFamily;
}

.sapUiMnuItm {
	display: block;
	height: @sapUiMnuItmHeight;
	line-height: @sapUiMnuItmHeight;
	white-space: nowrap;
	position: relative;
}

.sapUiMnuItm.sapUiMnuItmDsbl,
.sapUiMnuItm.sapUiMnuTfItm.sapUiMnuItmDsbl .sapUiMnuTfItemLbl,
.sapUiMnuItm.sapUiMnuTfItm.sapUiMnuItmDsbl.sapUiMnuItmHov .sapUiMnuTfItemLbl {
	color: @sapUiContentDisabledTextColor;
}

.sapUiMnuItm.sapUiMnuItmHov {
	color: @sapUiListTextColor;
	background-color: @sapUiListHoverBackground;
}

.sapUiMnuItm.sapUiMnuTfItm.sapUiMnuItmHov .sapUiMnuTfItemLbl {
	color: @sapUiListTextColor;
}

.sapUiMnuItmL,
.sapUiMnuItmIco,
.sapUiMnuItmTxt,
.sapUiMnuItmSCut,
.sapUiMnuItmSbMnu,
.sapUiMnuItmR {
	display: inline-block;
	height: 100%;
	vertical-align: top;
	overflow: hidden;
	outline: none;
}

.sapUiMnuItmSCut,
.sapUiMnuItmSbMnu,
.sapUiMnuItmR {
	position: absolute;
	top: 0px;
}

.sapUiMnuItmL{
	width: 0;
}

.sapUiMnuItmIco {
	text-align: center;
	width: @sapUiMnuItmHeight;
	color: @sapUiContentNonInteractiveIconColor;
}

.sapUiMnuItmIco > img{
	max-width: 16px;
	max-height: 16px;
	vertical-align: middle;
}

.sapUiMnuItmDsbl > .sapUiMnuItmIco > img {
	opacity: 0.5;
	filter: alpha(opacity=50);
}

.sapUiMnuNoIco > .sapUiMnuItm > .sapUiMnuItmIco {
	width: 0px;
	display: none;
}

.sapUiMnuItmTxt {
	white-space: nowrap;
	padding-right: @sapUiMnuItmHeight + @sapUiMnuItmPadding;
}

.sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt {
	padding-right: 5px;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemLbl {
	vertical-align: top;
	margin-right: 5px;
	line-height: @sapUiMnuItmHeight;
	display: inline-block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt > .sapUiMnuTfItemWrppr {
	position: absolute;
	right: 5px;
	top: 0;
	width: 22ex;
	display: inline-block;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf {
	box-sizing: border-box;
	vertical-align: top;
	font-family: @sapUiFontFamily;
	font-size: @sapUiFontSize;
	-webkit-appearance: none; /*Needed for safari mobile*/
	border: 1px solid @sapUiFieldBorderColor;
	-webkit-border-radius: 0px; /*Needed for safari mobile*/
	background-color: @sapUiFieldBackground;
	color: @sapUiListTextColor;
	width: 100%;
	outline: none; /* remove Webkit glow effect */
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf:focus {
	background-color: @sapUiFieldBackground;
	border-color: @sapUiFieldFocusBorderColor;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf::-ms-clear {
	width : 0;
	height: 0;
	display:none;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf.sapUiMnuTfItemTfDsbl {
	/* Avoid text selection in disabled TextFields */
	-moz-user-select: none;
	-webkit-user-select: none;
	user-select: none;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf.sapUiMnuTfItemTfEnbl.sapUiMnuTfItemTfErr {
	border-color: @sapUiFieldInvalidColor;
	background-color: @sapUiFieldInvalidBackground;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf.sapUiMnuTfItemTfEnbl.sapUiMnuTfItemTfWarn {
	border-color: @sapUiFieldWarningColor;
	background-color: @sapUiFieldWarningBackground;
}

.sapUiMnuTfItmStretch {
	display: inline-block;
	width: 22ex;
	height: 1px;
}

.sapUiMnuNoSbMnu > .sapUiMnuItm > .sapUiMnuItmTxt {
	padding-right: 7px; /*2+5*/
}

.sapUiMnuItmSCut {
	white-space: nowrap;
	right: 22px;
	width: 0px;
	display: none;
}

.sapUiMnuItmSbMnu {
	right: 0;
	width: @sapUiMnuItmHeight;
	text-align: center;
	font-size: 0.75rem;
}

.sapUiMnuItmSbMnu > div:after {
	content: "\e066";
	font-family: 'SAP-icons';
	outline: none;
}

.sapUiMnuNoSbMnu > .sapUiMnuItm > .sapUiMnuItmSbMnu {
	width: 0px;
	display: none;
}

.sapUiMnuItmR {
	width: 2px;
	right: 0px;
}

.sapUiMnuDiv{
	position: relative;
	height: 3px;
}

.sapUiMnuDiv > hr {
	display: inline-block;
	margin: 0;
	position: absolute;
	left: 5px;
	right: 5px;
	margin-top: 1px;
	margin-bottom: 1px;
	border-width: 0;
	border-top: 1px solid @sapUiContentForegroundBorderColor;
	height: 1px;
	color: @sapUiToolbarSeparatorColor;
}

.sapUiMnuDivL,
.sapUiMnuDivR{
	display: inline-block;
	position: absolute;
	width: 5px;
	height: 100%;
}

.sapUiMnuDivR{
	right: 0;
}

.sapUiMnuDivL{
	left: 0;
}

.sapUiMnu.sapUiMnuScroll {
	overflow-x: none;
	overflow-y: auto;
}

.sapUiMnu.sapUiMnuScroll .sapUiMnuItmR {
	width: @sapUiMnuItmPadding + 1rem;
}

.sapUiMnuItm.sapUiMnuItmSubMnuOpen,
.sapUiMnuItm.sapUiMnuItmSubMnuOpen.sapUiMnuItmHov {
	background-color: @sapUiListSelectionBackgroundColor;
}

.sapUiMnuItm.sapUiMnuItmHov:active {
	color: @sapUiListActiveTextColor;
	background-color: @sapUiListActiveBackground;
}

.sapUiMnuItm.sapUiMnuItmDsbl.sapUiMnuItmHov,
.sapUiMnuItm.sapUiMnuItmDsbl.sapUiMnuItmHov:active {
	color: @sapUiContentDisabledTextColor;
	background-color: transparent;
}

.sapUiMnuItmR,
.sapUiMnuNoIco .sapUiMnuItmL {
	width: @sapUiMnuItmPadding;
}

.sapUiMnuItm.sapUiMnuItmDsbl .sapUiMnuItmIco {
	color: @sapUiContentDisabledTextColor;
}

.sapUiMnuItm.sapUiMnuItmHov:active .sapUiMnuItmIco {
	color: @sapUiContentContrastIconColor;
}

.sapUiMnuItm.sapUiMnuItmDsbl.sapUiMnuItmHov:active .sapUiMnuItmIco {
	color: @sapUiContentDisabledTextColor;
}

.sapUiMnuItmIco > img {
	padding-left: 0;
	max-width: @sapUiMnuItmHeight / 2;
	max-height: @sapUiMnuItmHeight / 2;
}

.sapUiMnu.sapUiMnuScroll .sapUiMnuItmTxt {
	padding-right: @sapUiMnuItmHeight + @sapUiMnuItmPadding + 1rem;
}

.sapUiMnuNoSbMnu > .sapUiMnuItm > .sapUiMnuItmTxt,
.sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt {
	padding-right: @sapUiMnuItmPadding;
}

.sapUiMnu.sapUiMnuScroll .sapUiMnuNoSbMnu > .sapUiMnuItm > .sapUiMnuItmTxt,
.sapUiMnu.sapUiMnuScroll .sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt {
	padding-right: @sapUiMnuItmPadding + 1rem;
}

.sapUiMnuNoIco .sapUiMnuItmTxt {
	padding-left: 0;
}

.sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt > .sapUiMnuTfItemWrppr {
	right: @sapUiMnuItmPadding;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf {
	font-family: @sapUiFontFamily;
	font-size: @sapMFontMediumSize;
	padding: 0.125rem 0.3125rem 0.125rem 0.3125rem;
	margin-top: 0.1875rem;
	height: @sapUiMnuItmHeight - 0.375rem;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemLbl {
	line-height: @sapUiMnuItmHeight;
	font-family: @sapUiFontFamily;
	font-size: @sapMFontMediumSize;
	color: @sapUiListTextColor;
	margin-right: @sapUiMnuItmPadding;
}

.sapUiMnuItmSbMnu > div:after {
	content: "\e1ed";
	color: @sapUiContentNonInteractiveIconColor;
}

.sapUiMnuItm.sapUiMnuItmHov .sapUiMnuItmSbMnu > div:after {
	color: @sapUiContentNonInteractiveIconColor;
}

.sapUiMnuItm.sapUiMnuItmHov:active .sapUiMnuItmSbMnu > div:after {
 	color: @sapUiContentContrastIconColor;
}

.sapUiMnu.sapUiMnuScroll .sapUiMnuItmSbMnu {
	right: 1rem;
}


/** Cozy Mode **/

.sapUiMnu.sapUiMnuCozySupport.sapUiSizeCozy {

	&.sapUiMnuScroll .sapUiMnuItmR {
		width: @sapUiMnuItmPaddingCozy + 1rem;
	}

	.sapUiMnuItm {
		height: @sapUiMnuItmHeightCozy;
		line-height: @sapUiMnuItmHeightCozy;
	}

	.sapUiMnuItmR,
	.sapUiMnuNoIco .sapUiMnuItmL {
		width: @sapUiMnuItmPaddingCozy;
	}

	.sapUiMnuItmIco {
		width: @sapUiMnuItmHeightCozy;
		font-size: @sapUiMnuItmHeightCozy / 2 - 0.125rem;
	}

	.sapUiMnuItmIco > img {
		max-width: @sapUiMnuItmHeightCozy / 2 - 0.125rem;
		max-height: @sapUiMnuItmHeightCozy / 2 - 0.125rem;
	}

	.sapUiMnuItmTxt {
		padding-right: @sapUiMnuItmHeightCozy + @sapUiMnuItmPaddingCozy;
	}

	&.sapUiMnuScroll .sapUiMnuItmTxt {
		padding-right: @sapUiMnuItmHeightCozy + @sapUiMnuItmPaddingCozy + 1rem;
	}

	.sapUiMnuNoSbMnu > .sapUiMnuItm > .sapUiMnuItmTxt,
	.sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt {
		padding-right: @sapUiMnuItmPaddingCozy;
	}

	&.sapUiMnuScroll .sapUiMnuNoSbMnu > .sapUiMnuItm > .sapUiMnuItmTxt,
	&.sapUiMnuScroll .sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt {
		padding-right: @sapUiMnuItmPaddingCozy + 1rem;
	}

	.sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt > .sapUiMnuTfItemWrppr {
		right: @sapUiMnuItmPaddingCozy;
	}

	.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf {
		height: @sapUiMnuItmHeightCozy - 0.375rem;
	}

	.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemLbl {
		line-height: @sapUiMnuItmHeightCozy;
		margin-right: @sapUiMnuItmPaddingCozy;
	}

	.sapUiMnuItmSbMnu {
		width: @sapUiMnuItmHeightCozy;
	}

}

html.sap-phone, html.sap-tablet {
	.sapMMenuLIImgThumbIcon {
		color: @sapUiContentNonInteractiveIconColor;
	}
	.sapMLIB.sapMLIBActive .sapMMenuLIImgThumbIcon::before {
		color: @sapUiContentContrastIconColor;
	}

	.sapMRespMenuDialog .sapMList .sapMLIBContent .sapMSLITitleOnly {
		font-size: @sapMFontMediumSize;
	}

	.sapMRespMenuDialog .sapMPage .sapMBar-CTX.sapMHeader-CTX {
		background-color: @sapUiGroupContentBackground;
		box-shadow: inset 0 -1px darken(@sapUiGroupContentBackground, 8);
	}
}

/* Compact size */
.sapUiSizeCompact {
	.sapUiMnuItmR, .sapUiMnuNoIco .sapUiMnuItmL {
		width: 12px;
	}

	.sapUiMnuNoIco.sapUiMnuNoSbMnu > .sapUiMnuItm > .sapUiMnuItmTxt {
		padding-right: 12px;
  	}
	.sapUiMnuDiv {
		height: 1px;
	}

	.sapUiMnuDiv > hr {
		left: 0rem;
		right: 0rem;
		margin-top: 0;
		margin-bottom: 0;
  }

}